package designpattern.composite;


public class Manager {
    public static void main(String[] args) {
        Animal chicken1=new Chicken("a");
        Animal chicken2=new Chicken("b");
        Animal duck1=new Duck("c");
        Flock flock=new Flock();
        flock.add(chicken1);
        flock.add(chicken2);
        flock.add(duck1);

        flock.eat();
    }
}
